// 验证文件feof
#include <stdio.h>

#define FILE_PATH "test"

int main(int argc, char **argv)
{
    FILE *fp = NULL;

    // 写打开
    fp = fopen(FILE_PATH, "r");
    if (fp == NULL)
    {
        return 1;
    }
    printf("%d\n", feof(fp));
    fseek(fp, 0, 2);
    fgetc(fp);

    printf("%d\n", feof(fp));
    
    return 0;
}